package com.tempjob.common.businesss.mongo.entity;

import com.anwen.mongo.annotation.ID;
import com.anwen.mongo.annotation.collection.CollectionField;
import com.anwen.mongo.annotation.collection.CollectionName;
import com.anwen.mongo.enums.FieldFill;
import com.anwen.mongo.enums.IdTypeEnum;
import com.tempjob.common.model.BusinessLicenseInfoVO;
import com.tempjob.common.model.IdendCardInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Version;

import java.io.Serializable;
import java.util.Date;

/**
 * 系统角色
 *
 * @TableName sys_role
 */
@CollectionName(value = "publish_user_info")
@Data
public class PublishUserInfo implements Serializable {

    @ID(type = IdTypeEnum.OBJECT_ID)
    @CollectionField("_id")
    private String id;

    @CollectionField(value = "user_id")
    @ApiModelProperty("用户id")
    private String userId;

    @CollectionField(value = "type")
    @ApiModelProperty("类型:1公司发布者2个体经营者3个人")
    private Integer type;

    @ApiModelProperty("是否就业援助基地")
    @CollectionField("employment_assistance")
    private Boolean employmentAssistance;

    @CollectionField(value = "contact_name")
    @ApiModelProperty("联系人姓名")
    private String contactName;

    @CollectionField(value = "contact_phone")
    @ApiModelProperty("联系电话")
    private String contactPhone;

    @CollectionField(value = "contact_address")
    @ApiModelProperty("联系地址")
    private String contactAddress;

    @CollectionField("longitude")
    @ApiModelProperty("经度")
    private Double longitude;

    @CollectionField("latitude")
    @ApiModelProperty("纬度")
    private Double latitude;

    @CollectionField(value = "ident_portrait_img")
    @ApiModelProperty("身份证正面图片地址")
    private String identPortraitImg;

    @CollectionField(value = "ident_emblem_img")
    @ApiModelProperty("身份证反面图片地址")
    private String identEmblemImg;

    @CollectionField(value = "ident_card_info")
    @ApiModelProperty("身份证信息")
    private IdendCardInfoVO identCardInfo;

    @CollectionField(value = "business_license_img")
    @ApiModelProperty("营业执照图片")
    private String businessLicenseImg;

    @CollectionField(value = "business_license_info")
    @ApiModelProperty("营业执照图片")
    private BusinessLicenseInfoVO businessLicenseInfo;

    @CollectionField("company_id")
    @ApiModelProperty("公司id")
    private String companyId;

    @CollectionField("conpany_name")
    @ApiModelProperty("公司名称")
    private String companyName;

    @CollectionField("individual_id")
    @ApiModelProperty("个体工商户id")
    private String individualId;

    @CollectionField("individual_name")
    @ApiModelProperty("个体工商户名称")
    private String individualName;

    @CollectionField("apply_desc")
    @ApiModelProperty("申请说明")
    private String applyDesc;

    @CollectionField(value = "apply_time")
    @ApiModelProperty("申请时间")
    private Date applyTime;


    @CollectionField(value = "audit_admin_id")
    @ApiModelProperty("审核人")
    private String auditAdminId;

    @CollectionField(value = "audit_admin_name")
    @ApiModelProperty("审核人")
    private String auditAdminName;

    @CollectionField(value = "audit_desc")
    @ApiModelProperty("审核内容")
    private String auditDesc;

    @CollectionField(value = "audit_time")
    @ApiModelProperty("审核时间")
    private Date auditTime;


    @CollectionField(value = "status")
    @ApiModelProperty("状态(0:待审核，1审核通过，2:审核不通过，3禁用)")
    private Integer status;

    @CollectionField(value = "oper_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新时间", hidden = true)
    private Date operTime;

    @CollectionField(value = "oper_id", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人id", hidden = true)
    private Long operId;

    @CollectionField(value = "oper_name", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value = "更新人", hidden = true)
    private String operName;

    @CollectionField(value = "create_id", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人id", hidden = true)
    private Long createId;

    @CollectionField(value = "create_name", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人", hidden = true)
    private String createName;

    @CollectionField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @Version
    @CollectionField("version")
    @ApiModelProperty(value = "乐观锁", hidden = true)
    private Integer version;

    @CollectionField(exist = false)
    private static final long serialVersionUID = 1L;
}
